package own.knight.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import own.knight.bean.User;
import own.knight.dao.IUserDao;
import own.knight.service.IUserService;

@Service(value="userServiceImpl")
public class UserServiceImpl implements IUserService {

	@Autowired
	private IUserDao userDaoImpl;
//	@Override
//	public int add(User u) {
//		return userDaoImpl.add(u);
//	}
//
//	@Override
//	public int update(User u) {
//		return userDaoImpl.update(u);
//	}

	@Override
	public User findUser(int id) {
		return userDaoImpl.findById(id);
	}

	@Override
	public List<User> findAll() {
		return userDaoImpl.findAll();
	}

}
